<%--
  Created by IntelliJ IDEA.
  User: 王新蕊
  Date: 2024/10/18
  Time: 13:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="com.example.chapter7.dao.AdminDao" %>
<%@ page import="com.example.chapter7.dao.AdminDao" %>
<%
        request.setCharacterEncoding("UTF-8");
        String Action = request.getParameter("Action");
        if (Action !=null && Action.equals("add")) {
            String User = request.getParameter("User");
            String Pwd = request.getParameter("Pwd");
            AdminDao adminDao = new AdminDao();
            boolean isOK = adminDao.CheckLogin(User, Pwd);
            if (isOK) {
                out.print("<script>aler('登陆成功！')" +
                        "Location.href='news.jsp'" +
                        "</script>");
            } else {

            }
        }

<html>
<head>
    <title>Title</title>
</head>
<body>

</body>
</html>
